22. Relational Database Structure

Relational Database Structure

A database is an organized collection of data that is structured to facilitate the storage, retrieval, modification, and deletion of data. There are two main types of databases: relational databases and non-relational databases, with relational being the most popular.
SQL, or Structured Query Language, is the standard language for communicating with relational databases.

Let’s turn to Derek Steer , co-founder and CEO of Mode Analytics (a company that is building software for SQL-based data analysis), to introduce the basic structure of relational databases, their advantages and disadvantages, and how you can interact with them using SQL. The ~5 minutes of videos and text below are all you need to know for this lesson.

Databases and SQL are topics that deserve a full course. If you'd like to learn more, enroll in the Data Foundations Nanodegree program or the Data Analyst Nanodegree program (if you aren't already) to access Derek's SQL for Data Analysis course.

I've selected a subset of videos from that course most relevant to Data Wrangling for you to preview here. As you’re following along with the video, imagine how the Rotten Tomatoes master dataset would be represented and how you might query it to get information. There is also a SQL Explorer Workspace following the videos where you can make queries on the same PostgreSQL database that Derek mentions.

Why Do Data Analysts Use Relational Databases & SQL?

Why Do Analysts Like SQL

Why Do Businesses Choose Relational Databases & SQL?

Why Businesses Choose Databases

In the Flat File Structure concept, we mentioned that:

Disadvantages of flat files … include:

  • Lack of standards
  • Data redundancy
  • Sharing data can be cumbersome
  • Not great for large datasets (see "When does small become large?" in the Cornell link in More Information )

As Derek mentioned, relational databases alleviate these issues. If these issues matter to you, relational databases are a better alternative than saving to a flat file like a CSV file.

How Relational Databases Store Data

How Databases Store Data

Types of SQL Statements

Types Of Statements

SELECT and FROM

SELECT & FROM Statements

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: sql-evaluator
  • Opened files (when workspace is loaded): n/a